

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>表单组合</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="__STATIC__/layuikn/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__STATIC__/layuikn/style/admin.css" media="all">
</head>

<style>
    #zyzlzd .layui-form-checkbox{
        margin-top: 10px;
    }
    .layui-form-radio{
        margin: 0;
    }
    .layui-form-label{
        width: 150px;
    }
</style>

<body>

<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-card-header"><h2>实验室检测</h2></div>
        <div class="layui-card-body" style="padding: 15px;">
            <fieldset class="layui-elem-field" style="padding: 20px;">
                <legend style="font-size: 15px;">个人信息</legend>
                <div class="layui-row">
                    <div class="layui-col-md4">住院号：<span id="huanzhe_hospital_id"></span></div>
                    <div class="layui-col-md4">姓名：<span id="huanzhe_name"></span></div>
                    <div class="layui-col-md4">性别：<span id="huanzhe_gender"></span></div>
                </div>
                <div class="layui-row">
                    <div class="layui-col-md4">科室：<span id="huanzhe_keshi"></span></div>
                    <div class="layui-col-md4">年龄：<span id="huanzhe_age"></span></div>
                    <div class="layui-col-md4">录入日期：<span id="huanzhe_created"></span></div>
                </div>
            </fieldset>
            <form class="layui-form" action="" lay-filter="shiyanshi-form">
                <fieldset class="layui-elem-field" style="padding: 20px;">
                    <legend style="font-size: 15px;">实验室检测</legend>
                    <div>
                        <div style="font-weight: 600;">1、血生化</div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">总蛋白</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_zongdanbai"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">g/L</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">肌酐</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_jigan"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">umol/L</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">白蛋白</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_baidanbai"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">g/L</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">尿素氮</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_niaosudan"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">umol/L</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">前白蛋白</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_q_baidanbai"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>

                                    <div class="layui-form-mid layui-word-aux" style="margin-top:0;padding-top: 0;">
                                        <input type="radio" name="xsh_q_baidanbai_dw" value="0" title="mg/L">
                                        <input type="radio" name="xsh_q_baidanbai_dw" value="1" title="g/L">
                                    </div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">总胆红素</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_zongdanhongsu"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">umol</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">转铁蛋白</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_zhuantiedanbai"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">g/L</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">直接胆红素</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_zhijiedanhongsu"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">umol/L</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">C反应蛋白</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_fanyingdanbai"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">mg/L</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">总胆固醇</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_zongdanguchun"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">mmol/L</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">血糖</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_xuetang"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">mmol/L</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">甘油三酯</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_ganyousanzhi"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">mmol/L</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">AST</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_ast"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">U/L</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">高密度脂蛋白胆固醇</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_gmdzdbdgc"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">mmol/L</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">ALT</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_alt"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">U/L</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">低密度脂蛋白胆固醇</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_dmdzdbdgc"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">mmol/L</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">白介素-1</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_baijiesu_1"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">pg/ml</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">白介素-6</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_baijiesu_6"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">pg/ml</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">TNF-a</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xsh_tnf_a"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">pg/ml</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div>
                        <div style="font-weight: 600;">2、血常规</div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">血红蛋白</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xcg_xuehongdanbai"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">g/L</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">白细胞</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xcg_baixibao"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">*10^9/L</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">中性粒细胞计数</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xcg_xibaojishu"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">*10^9/L</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">淋巴细胞计数</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xcg_linba_xibaojishu"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">*10^9/L</div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-row">
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">红细胞</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xcg_hongxibao"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">*10^12/L</div>
                                </div>
                            </div>
                            <div class="layui-col-md6">
                                <div class="layui-form-item">
                                    <label class="layui-form-label">血小板</label>
                                    <div class="layui-input-inline">
                                        <input type="text" name="xcg_xuexiaoban"  placeholder="" autocomplete="off" class="layui-input">
                                    </div>
                                    <div class="layui-form-mid layui-word-aux">*10^9/L</div>
                                </div>
                            </div>
                        </div>
                    </div>

                </fieldset>
                <div class="layui-form-item layui-layout-admin">
                    <div class="layui-input-block">
                        <div class="layui-footer" style="left: 0;">
                            <button class="layui-btn" lay-submit="" lay-filter="last">上一步</button>
                            <button class="layui-btn" lay-submit="" lay-filter="next">下一步</button>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </div>

</div>


<script src="__STATIC__/layuikn/layui/layui.js"></script>
<script>
    layui.config({
        base: '__STATIC__/layuikn/' //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
        ,ajaxData:'../extends/ajaxData'
        ,getOption:'../extends/getOption'
    }).use(['index', 'jquery', 'ajaxData', 'getOption', 'form', 'laydate'], function(){
        var $ = layui.$
            ,admin = layui.admin
            ,element = layui.element
            ,layer = layui.layer
            ,laydate = layui.laydate
            ,ajaxData = layui.ajaxData
            ,getOption = layui.getOption
            ,form = layui.form;

        var pid = sessionStorage.getItem('pid');
        ajaxData.ajaxData('GET',"{:url('patient/info')}?pid=" + pid,{},function (back) {
            if(back.data){
                $('#huanzhe_hospital_id').html(back.data.hospital_id);
                $('#huanzhe_name').html(back.data.name);
                $('#huanzhe_gender').html(back.data.gender);
                $('#huanzhe_keshi').html(back.data.keshi);
                $('#huanzhe_age').html(back.data.age);
                $('#huanzhe_created').html(back.data.created);
            }

            form.render();
        });

        ajaxData.ajaxData('GET',"{:url('shiyanshi/info')}?pid=" + pid,{},function (back) {
            if(back.data){
                back.data.xsh_q_baidanbai_dw = "" + back.data.xsh_q_baidanbai_dw
                //给表单赋值
                form.val("shiyanshi-form", back.data);
            }
            form.render();
        });

        form.on('submit(last)',function(data){
            if(pid == 'null') return  false;
            window.location.href = "{:url('kspf/show')}";
            return  false;
        });

        /* 监听提交 */
        form.on('submit(next)', function(data){
            if(pid == 'null') return  false;
            ajaxData.ajaxData('POST', "{:url('shiyanshi/update')}?pid=" + pid, data.field,function (back) {
                if(back.code == 200){
                    window.location.href = "{:url('renticeliang/show')}";
                }else{
                    layer.msg(back.msg, {icon: 5});
                }
            });
            // parent.layer.alert(JSON.stringify(data.field), {
            //     title: '最终的提交信息'
            // })
            return false;
        });

    });
</script>
</body>
</html>
